// 每个log-item间距
$log-item-padding: 30px;

.mr-logs {
  background: #fff;
  border: 1px solid $gray-02;
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, 0.05);
  margin-top: 20px;
  border-radius: 4px;
  &-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 57px;
    border-bottom: 1px solid #f1f1f1;
    &-left {
      text-align: left;
      line-height: 20px;
      font-size: 14px;
      color: $gray-08;
      font-weight: 500;
    }
    &-right {
      position: relative;
      right: -4px;
      .next-input.next-xs .next-input-text-field {
        padding: 0 0 0 16px;
      }
    }
  }

  &-content {
    padding: 20px;
    padding-bottom: 0;
    // 描述
    &-desc {
      display: flex;
      position: relative;
      // 没有其他记录则无padding和线条
      &.no-log {
        .log-line {
          display: none;
        }
        .mr-des-content {
          margin-bottom: 0;
        }
        .mr-logs-content-desc-right .title {
          padding-bottom: 0;
        }
      }
      &-left {
        width: 40px;
        padding-right: 20px;
        display: flex;
        flex-direction: column;
        .mr-log-chat-icon {
          color: $gray-06 !important;
        }
        .log-line {
          flex: 1;
          margin-top: 6px;
          margin-left: 9px;
          width: 1px;
          background: $gray-03;
        }
      }
      &-right {
        flex: 1;
        max-width: calc(100% - 40px);
        .title {
          display: flex;
          justify-content: space-between;
          align-items: center;
          // padding-bottom: $log-item-padding;
          &-left {
            color: $gray-08;
            line-height: 20px;
            font-size: 14px;
            display: flex;
            align-items: center;
          }
          &-right {
            color: $gray-06;
            line-height: 16px;
            font-size: 12px;
          }
        }
        // TODO 接口暂不支持获取最新修改描述日志，修改描述在原位置
        .mr-des-content {
          text-align: left;
          font-size: 14px;
          color: $gray-08;
          display: inline-block;
          width: 100%;
          outline: none;
          // line-height: 20px;
          cursor: pointer;
          border-radius: 4px;
          padding: 8px 0px;
          // 为了左侧线条，增加20px
          margin-bottom: 20px;
          margin-top: 13px;
          &:focus,
          &:hover {
            background: #f5f5f5;
          }
          &.isEditing {
            &:focus,
            &:hover {
              background: #fff;
            }
          }
          &.no-description {
            padding: 0;
          }
          // 没权限
          &.disabled:focus,
          &.disabled:hover {
            background: #fff;
          }
          &.disabled .mr-des-content {
            cursor: default !important;
          }
          .desc-placeholder {
            line-height: 20px;
            font-size: 12px;
            color: $gray-06;
          }
          .markdown-body {
            & > p {
              margin: 0;
              word-break: break-all;
            }
            img {
              max-width: 100%;
            }
            &.not-allowed {
              cursor: not-allowed;
            }
          }
        }
      }
    }

    // 动态
    .log-item {
      display: flex;
      margin-top: 6px;
      &.more {
        cursor: pointer;
      }
      &:last-child {
        // .log-line {
        //   display: none;
        // }
        // .log-item-right {
        //   .log-item-title {
        //     padding: 0;
        //   }
        // }
      }
      &-left {
        display: flex;
        flex-shrink: 0;
        margin-top: 2px;
        &.no-mt {
          margin-top: 0;
        }
        .log-item-icon {
          margin-right: 20px;
          color: $gray-06;
          display: flex;
          flex-direction: column;
          .log-line {
            flex: 1;
            margin-top: 6px;
            margin-left: 9px;
            width: 1px;
            background: $gray-03;
          }
        }
      }
      &-right {
        flex: 1;
        font-size: 14px;
        line-height: 20px;
        color: $gray-06;
        max-width: calc(100% - 40px);
        .log-item-title {
          display: flex;
          align-items: center;
          justify-content: space-between;
          &.has-pb {
            padding-bottom: $log-item-padding;
          }
          &-time {
            flex-shrink: 0;
            margin-left: 12px;
            text-align: right;
            line-height: 32px;
            color: $gray-06;
            font-size: 12px;
            align-self: flex-start;
          }
          &-info {
            line-height: 32px;
            font-size: 14px;
            color: $gray-08;
            display: flex;
            align-items: center;
            flex: 1;
            flex-basis: 100%;
            max-width: calc(100% - 150px);
            &.commit-logs {
              align-items: center;
            }
            .log-item-title-author {
              flex-shrink: 0;
              height: 24px;
              display: inline-block;
              margin-right: 8px;
              font-weight: 500;
              &.mr0 {
                margin-right: 0;
              }
            }
            .log-item-title-author-yundou {
              display: flex;
            }
            .log-item-title-author-tag {
              .#{$teamix-prefix}color-tag {
                margin: 0 4px;
              }
            }
            .log-item-title-content {
              flex-shrink: 0;
            }
            .note-content-wrapper {
              flex: 1;
              line-height: 24px;
              max-width: calc(100% - 32px);
              .note-content p {
                display: inline;
              }
            }
            .note-user-name {
              float: left;
              line-height: 24px;
              color: $gray-08;
              font-size: 14px;
              font-weight: 500;
            }
          }
        }
        .log-item-detail {
          padding-bottom: $log-item-padding;
        }
        .log-item-push-list {
          margin-top: 8px;
          &-item {
            line-height: 20px;
            font-size: 14px;
            color: $gray-08;
            height: 52px;
            display: flex;
            align-items: center;
            box-shadow: inset 0 -1px 0 0 #f1f1f1;
            .sha {
              color: $primary-brand;
              &:hover,
              &:visited {
                color: $hover-brand;
              }
            }
            .mr-detail-logs-balloon {
              word-break: break-all;
              margin: 0 8px;
              white-space: nowrap;
              overflow: hidden;
              text-overflow: ellipsis;
              max-width: 400px;
            }
          }
        }
      }
    }

    // 保持字号及颜色
    .at-text-avatar-addedText {
      font-size: 14px;
      color: $gray-08;
      margin-left: 8px;
    }
  }
  .at-text-avatar-addedText {
    font-weight: 500;
  }
}

.mr-log-tooltip.markdown-body {
  line-height: 24px;
  position: relative;
  top: 2px;
  & > p {
    margin: 0;
  }
  img {
    max-width: 100%;
  }
}

// 整体评论
.total-comment {
  margin: 0 -20px;
  padding: 12px 20px;
}
.md-editor-panel-textarea-tips {
  >div {
    display: flex;
    align-items: center;
  }
}
